package com.wantup.miaosha.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author 赵洛伟
 * @since 2019-06-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TblMiaoshagoods extends Model<TblMiaoshagoods> {

    private static final long serialVersionUID = 1L;

    /**
     * 秒杀商品自增id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 商品id
     */
    @TableField("goodsId")
    private Integer goodsId;
    /**
     * 秒杀价
     */
    @TableField("miaoShaPrice")
    private BigDecimal miaoShaPrice;
    @TableField("stockCount")
    private Integer stockCount;
    /**
     * 秒杀开始时间
     */
    @TableField("startDate")
    private Date startDate;
    /**
     * 秒杀结束时间
     */
    @TableField("endDate")
    private Date endDate;


    public static final String ID = "id";

    public static final String GOODSID = "goodsId";

    public static final String MIAOSHAPRICE = "miaoShaPrice";

    public static final String STOCKCOUNT = "stockCount";

    public static final String STARTDATE = "startDate";

    public static final String ENDDATE = "endDate";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
